﻿using System;

namespace Test.Prompts.Infrastructure
{
    public class DataBuilder<T>
    {
        private readonly T _defaultEntity;

        public DataBuilder(T defaultEntity)
        {
            _defaultEntity = defaultEntity;
        }

        public void With(Action<T> entityManipulationAction)
        {
            entityManipulationAction(_defaultEntity);
        }

        public void And(Action<T> entityManipulationAction)
        {
            With(entityManipulationAction);
        }

        public T Build()
        {
            return _defaultEntity;
        }
    }
}
